package com.ankicoo.file.service.impl;

import com.ankicoo.file.service.FileService;
import com.ankicoo.file.service.OssFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.InputStream;

/**
 * Description: 文件处理
 *
 * @author : QCYANG
 * @date : 2021/7/15 18:05
 */
@Service
public class FileServiceImpl implements FileService {
    @Autowired
    private OssFileService ossFileService;

    @Override
    public void saveFile(String filePath, InputStream inputStream){
        ossFileService.upload(filePath,inputStream);
    }

    @Override
    public InputStream openInputStream(String filePath){
        return ossFileService.openInputStream(filePath);
    }

    @Override
    public void deleteFile(String filePath){
        ossFileService.delete(filePath);
    }

    public void downLoadFile(){

    }
}
